<template>
  <div class="table-page-search-wrapper">
    <el-row :gutter="20">
      <el-form :model="form" ref="form" :inline="true">
        <el-col :span="6">
          <el-form-item label="审核环节" prop="state" class="mb0">
            <el-select clearable v-model="form.state">
              <el-option :value="1" label="自评" />
              <el-option :value="2" label="科室" />
              <el-option :value="3" label="党支部" />
              <el-option :value="4" label="考评委员会" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="考评方案名称" prop="moralityPlanName" class="mb0">
            <el-input clearable v-model="form.moralityPlanName" placeholder="输入方案名称搜索" />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item class="mb0">
            <el-tooltip class="item" content="查询" effect="dark" placement="top">
              <el-button type="primary" @click="handleSearch" icon="el-icon-search" />
            </el-tooltip>
            <el-tooltip class="item" content="重置" effect="dark" placement="top">
              <el-button @click="handleReset" icon="el-icon-refresh-right" />
            </el-tooltip>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        pageNo: 1
      }
    }
  },
  methods: {
    handleSearch() {
      console.log('form', this.form)

      this.$emit('search', this.form)
    },
    handleReset() {
      this.$refs.form.resetFields()
      this.handleSearch()
    }
  }
}
</script>
